Cross build laika-sbt for sbt 2#774
Conversation
| logLevel = MessageFilter.Warning | ||
| ) | ||
|
|
||
| private def unapply(conf: LaikaConfig) = conf |
There was a problem hiding this comment.
unused, removed for suppress warning in Scala3.
| Laika / clean := Tasks.clean.value, | ||
| laikaSite / mappings := Def.sequential(Tasks.site, Tasks.mappings).value | ||
| ) :+ (cleanFiles += (Laika / target).value) | ||
| @nowarn("msg=unused import") |
There was a problem hiding this comment.
For sbtcompat.PluginCompat.* in Scala3.
fix typelevel#773 - Exclude all laika-sbt tasks from sbt 2 caching with `Def.uncached`. - Adapt to sbt2 API changes using https://github.com/sbt/sbt2-compat if you don't like adding dependency, we can define small set of PluginCompat. - Run the plugin build and tests in CI with sbt 2, Scala 3, and Java 17. - Set `Laika / target` explicitly in each scripted project `build.sbt` so scripted tests work across sbt 1 and 2 target directory. Depends on upstream sbt change sbt/sbt#9377
reardonj
left a comment
There was a problem hiding this comment.
This looks pretty reasonable. I'm not familiar with the CI setup stuff enough to comment on it.
|
|
||
| enablePlugins(LaikaPlugin) | ||
|
|
||
| Laika / target := baseDirectory.value / "target" / "docs" |
There was a problem hiding this comment.
Did this have to be added due to sbt2 changes the target directory setup?
| else Some(8) | ||
| }, | ||
| // Scaladoc 3 cannot currently resolve some TASTy from sbt 2 transitive dependencies. | ||
| // https://github.com/scala/scala3/issues/18487 |
There was a problem hiding this comment.
I see you fixed this bug. I guess we are stuck until at least 3.9 to make use of it though?
| // TODO: Re-enable MiMa for sbt 2 once a previous sbt 2 plugin artifact exists. | ||
| // The sbt 2 / Scala 3 plugin artifact did not exist in previous Laika releases, | ||
| // so MiMa cannot compare against a missing baseline. | ||
| mimaPreviousArtifacts := { |
There was a problem hiding this comment.
I don't suppose there is a nicer way to do this @armanbilge ?
| Seq( | ||
| Laika / sourceDirectories := Seq(sourceDirectory.value / "docs"), | ||
| Laika / excludeFilter := HiddenFileFilter, | ||
| laikaInputs := Def.uncached(Settings.defaultInputs.value), |
There was a problem hiding this comment.
Do these need to be uncached or is this just for ease of migration?
Depends on upstream sbt change sbt/sbt#9377,
we need to wait until sbt 2.0.12.0.1 is released with that fix.close #773
Def.uncached.Laika / targetexplicitly in each scripted projectbuild.sbtso scripted tests work across sbt 1 and 2 target directory.Depends on upstream sbt change sbt/sbt#9377